package com.fanco.learn_datastruct_leetcode.designpattern.command;

/**
 * @author qiaowang 2022/2/17
 * 描述
 */
public class TvOffCommand implements Command {

    TvReceiver tvReceiver;

    public TvOffCommand(TvReceiver tvReceiver) {
        this.tvReceiver = tvReceiver;
    }

    @Override
    public void execute() {
        tvReceiver.off();
    }

    @Override
    public void undo() {
        tvReceiver.on();
    }
}
